/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2022-12-01 13:52:54
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-07 11:01:30
 */
const parentRouter = [
  {
    label: '系统管理',
    path: ''
  }
]
const routes = [
  {
    path: '/system/user',
    name: 'User',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '用户管理',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: () => import('@/modules/system/views/User.vue')
  },
  {
    path: '/system/user/userAuth',
    name: 'userAuth',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '用户权限',
      keepAlive: false,
      parentTitle: [...parentRouter, { label: '用户管理', path: '/system/user' }]
    },
    component: () => import('@/modules/system/components/userView.vue')
  },
  {
    path: '/system/user/profile',
    name: 'userProfile',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '个人中心',
      keepAlive: false
      // parentTitle: [...parentRouter, { label: '用户管理', path: '/system/user' }]
    },
    component: () => import('@/modules/system/components/userProfile.vue')
  },
  {
    path: '/system/tenant',
    name: 'Tenant',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '租户管理',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: () => import('@/modules/system/views/tenant.vue')
  },
  {
    path: '/system/tenant/assignMenu',
    name: 'assignMenu',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '分配菜单',
      keepAlive: false,
      parentTitle: [...parentRouter, { label: '租户管理', path: '/system/tenant' }]
    },
    component: () => import('@/modules/system/components/assignMenu.vue')
  },
  {
    path: '/system/dict',
    name: 'Dict',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '字典管理',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: () => import('@/modules/system/views/dict.vue')
  },
  {
    path: '/system/dict/dictValue',
    name: 'DictValue',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '字段值管理',
      keepAlive: false,
      parentTitle: [...parentRouter, { label: '字典管理', path: '/system/dict' }]
      // parentTitle: ['系统管理', '字典管理']
    },
    component: () => import('@/modules/system/views/dictValue.vue')
  },
  {
    path: '/system/exApplication',
    name: 'ExternalApplication',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '外部应用',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: () => import('@/modules/system/views/ExternalApplication.vue')
  },
  {
    path: '/system/announcement',
    name: 'Announcement',
    meta: {
      icon: 'icon-renyuanguanli',
      title: '通知公告',
      keepAlive: true,
      parentTitle: parentRouter
    },
    component: () => import('@/modules/system/views/Announcement.vue')
  }
]
export default routes
